<template>
    <div class="main">
        <div class="content">
            <div class="breadcrumb">
                <div class="title">当前位置：</div>
                <el-breadcrumb separator="/">
                    <el-breadcrumb-item><a href="/admin">首页</a></el-breadcrumb-item>
                    <el-breadcrumb-item><a href="/commission/list">佣金明细</a></el-breadcrumb-item>
                    <el-breadcrumb-item>明细列表</el-breadcrumb-item>
                </el-breadcrumb>
            </div>
            <div class="cont">
                <div class="title">
                    <div class="left">
                        <div class="item ">
                            <el-date-picker
                            v-model="date"
                            type="daterange"
                            align="right"
                            unlink-panels
                            range-separator="至"
                            start-placeholder="开始日期"
                            end-placeholder="结束日期"
                            :picker-options="pickerOptions">
                            </el-date-picker>
                        </div>
                    </div>
                    <div class="right">
                        <div class="item select">
                            <el-select v-model="type" placeholder="会员分组">
                                <el-option label="分类" :value="1"></el-option>
                                <el-option label="分类1" :value="2"></el-option>
                            </el-select>
                        </div>
                        <div class="item select">
                            <el-select v-model="type" placeholder="会员等级">
                                <el-option label="分类" :value="1"></el-option>
                                <el-option label="分类1" :value="2"></el-option>
                            </el-select>
                        </div>
                        <div class="item">
                            <el-input placeholder="请输入会员信息/操作人信息" v-model="type"></el-input>
                            <el-button type="primary">搜索</el-button>
                        </div>
                        <div class="item">
                            <el-button type="success">导出</el-button>
                        </div>
                    </div>
                </div>
                <el-table
                    :data="tableData"
                    style="width: 100%"
                    @selection-change="handleSelectionChange"
                >
                    <el-table-column type="selection" width="55"></el-table-column>
                    <el-table-column prop="date" label="粉丝"></el-table-column>
                    <el-table-column prop="date" label="会员信息"></el-table-column>
                    <el-table-column prop="date" label="佣金变化"></el-table-column>
                    <el-table-column prop="date" label="当前佣金"></el-table-column>
                    <el-table-column prop="date" label="备注"></el-table-column>
                    <el-table-column label="操作人"></el-table-column>
                    <el-table-column prop="date" label="操作时间"></el-table-column>
                </el-table>
                <div class="page">
                    <el-pagination
                    @size-change="handleSizeChange"
                    @current-change="handleCurrentChange"
                    :current-page="currentPage"
                    :page-sizes="[10, 50, 100, 200]"
                    :page-size="pageSize"
                    layout="total, sizes, prev, pager, next, jumper"
                    :total="total">
                    </el-pagination>
                </div>
            </div>
        </div>

    </div>
</template>
<script>
export default {
    data(){
        return{
            tableData:[{date:1}],
            currentPage:1,//当前分页
            pageSize:10,//分页数量
            total:0,//数据总数
            type:'',
            date:'',
            pickerOptions: {
                shortcuts: [{
                    text: '最近一周',
                    onClick(picker) {
                    const end = new Date();
                    const start = new Date();
                    start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
                    picker.$emit('pick', [start, end]);
                    }
                }, {
                    text: '最近一个月',
                    onClick(picker) {
                    const end = new Date();
                    const start = new Date();
                    start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                    picker.$emit('pick', [start, end]);
                    }
                }, {
                    text: '最近三个月',
                    onClick(picker) {
                    const end = new Date();
                    const start = new Date();
                    start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
                    picker.$emit('pick', [start, end]);
                    }
                }]
            },
        }
    },
    mounted(){
        
    },
    computed:{
        
    },
    methods:{
        //当前页面数据量改变
        handleSizeChange(val) {
            console.log(`每页 ${val} 条`);
        },
        //翻页
        handleCurrentChange(val) {
            console.log(`当前页: ${val}`);
        },
        //编辑
        handleEdit(index, row) {
            console.log(index, row);
        },
        //删除
        handleDelete(index, row) {
            console.log(index, row);
        },
        //当前选中项
        handleSelectionChange(val) {
            console.log(val);
        }
    }
}
</script>
<style lang="scss" scoped>
    .main{
        display: flex;
        .content{
            padding: 20px;
            width: 100%;
            .breadcrumb{
                display: flex;
                align-items: center;
            }
            .cont{
                padding: 20px 30px;
                background-color: #ffffff;
                margin-top: 15px;
                box-sizing: border-box;
                .title{
                    display: flex;
                    justify-content: space-between;
                    width: 100%;
                    .left,.right{
                        display: flex;
                        justify-content: flex-end;
                        .item{
                            margin: 0 5px;
                            display: flex;
                        }
                        .select{
                            width: 120px;
                        }
                    }
                }
                .table{
                    .el-row{
                        padding: 10px 15px;
                        margin-top: 20px;
                        background-color: #f0f0f0;
                        >div{
                            text-align: center;
                        }
                        >div:first-child{
                            text-align: left;
                        }
                    }
                    .item{
                        margin-top: 20px;
                        .title{
                            padding: 10px 15px;
                            background-color: #f0f0f0;
                            box-sizing: border-box;
                            display: flex;
                            justify-content: space-between;
                            align-items: center;
                            font-size: 12px;
                            .left{
                                display: flex;
                                align-items: center;
                                strong{
                                    margin: 0 10px;
                                }
                                .order_num{
                                    color: #666;
                                }
                            }
                        }
                        .el-row{
                            background-color: #ffffff;
                            margin-top: 0;
                            padding: 0;
                            .goods_name{
                                display: flex;
                                .img{
                                    border: 1px solid #f0f0f0;
                                    width: 50px;
                                    height: 50px;
                                    padding:5px;
                                    img{
                                        width: 50px;
                                        height: 50px;
                                        
                                    }
                                }
                                .title{
                                    width:calc(100% - 80px);
                                    background-color: #ffffff;
                                }
                            }
                            .el-col{
                                border-right: 1px solid #f0f0f0;
                                padding: 10px 20px;
                                border-bottom: 1px solid #f0f0f0;
                            }
                            .el-col:first-child{
                                border-left: 1px solid #f0f0f0;
                            }
                            .item{
                                font-size: 12px;
                                .yes{
                                    padding: 5px 20px;
                                    background-color: rgb(0, 204, 255);
                                    color: #ffffff;
                                }
                                .no{
                                   padding: 5px 20px;
                                   background-color: #666;
                                   color: #ffffff;
                                }
                            }
                        }
                    }
                }
                .page{
                    text-align: center;
                    padding: 20px 0;
                }
            }
        }
    }
</style>